<?php

$citizens = array();

$data_file = 'data.dat';

$lines = file($data_file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);

foreach($lines as $key => $line) {

	$a = explode(',', $line);
	
	if ($a[8] == 1) {
		printf("%s,%s\r\n", $a[0], $a[1]);
	}
}

?>